package za.ac.wits.elen7045.exceptions;

/**
 * @author ed
 * @Date 13/6/2012
 * 
 * This is a child of the Abstract Base Class for the Error Handling Framework.
 * The framework is based on the Template Method design Pattern.
 *
 */
@SuppressWarnings("serial")
public class ActionRequiredByBillingCompanyWebSite extends APSException {
	
	private final String errorCode = "aps003";
	private String errorMessage;
	
	public ActionRequiredByBillingCompanyWebSite(String aBaseUrl) {
		
		setBaseUrl(aBaseUrl);
    	generateErrorObjectToXml(this);		
	}
	
	public ActionRequiredByBillingCompanyWebSite(String aBaseUrl, String anErrorMessage) {
		
		setBaseUrl(aBaseUrl);
    	setErrorMessage(anErrorMessage);
    	generateErrorObjectToXml(this);	
	}
	
	public ActionRequiredByBillingCompanyWebSite(String aBaseUrl, String anErrorMessage, Throwable aCause) {
		setBaseUrl(aBaseUrl);
    	setErrorMessage(anErrorMessage);
    	generateErrorObjectToXml(this);
	}
	
	public ActionRequiredByBillingCompanyWebSite(String aBaseUrl, String anErrorMessage, Throwable aCause,
            							boolean enableSuppression, boolean writableStackTrace) {
		setBaseUrl(aBaseUrl);
    	setErrorMessage(anErrorMessage);
    	generateErrorObjectToXml(this);
    }
	

	/* (non-Javadoc)
	 * @see za.ac.wits.elen7045.exceptions.APSException#setBaseUrl(java.lang.String)
	 */
	@Override
	protected void setBaseUrl(String abaseUrl) {
		baseUrl = abaseUrl;

	}
	
	/* (non-Javadoc)
	 * @see za.ac.wits.elen7045.exceptions.APSException#getBaseUrl(java.lang.String)
	 */
	@Override
	public String getBaseUrl() {
		return this.baseUrl;

	}


	/* (non-Javadoc)
	 * @see za.ac.wits.elen7045.exceptions.APSException#setErrorCode(java.lang.String)
	 */
	@Override
	public String getErrorCode() {
		return this.errorCode;

	}

	/**
	 * @return the errorMessage
	 */
	public String getErrorMessage() {
		return errorMessage;
	}

	/**
	 * @param errorMessage the errorMessage to set
	 */
	public void setErrorMessage(String anErrorMessage) {
		this.errorMessage = anErrorMessage;
	}

}
